import request from '@/apis/request';
import { api } from '@/config/apiBaseUrl';

const URL = {
    positionList: `${api}/company/post/search`,
    positionDetail: `${api}/company/post/getDetail/`,
    resumeList: `${api}/resume/getAllByUserId/`,
    deliveryResume: `${api}/resume/delivery`
};

// 获取职位列表
export function getPositionList (data) {
    return request({ url: URL.positionList, method: 'post', data });
}

// 获取职位详情
export function getPositionDetail (data) {
    return request({ url: URL.positionDetail + `${data.postId}`});
}

// 获取简历列表
export function getResumeList (data) {
    return request({ url: URL.resumeList + `${data.userId}`});
}

// 投递简历
export function deliveryResume (data) {
    return request({ url: URL.deliveryResume, method: 'post', data });
}
